package net.sk.china.city.talk.request.system;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 城市表 Request
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/2 16:14
 * // +----------------------------------------------------------------------
 */

@Data
public class SystemCitySearchRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "所属城市ID", required = true, example = "0")
    @NotNull(message = "所属城市ID不能为空")
    @DecimalMin(value = "0", message = "所属城市ID必须大于等于0")
    private Integer parentId;

    @ApiModelProperty(value = "名称")
    @Length(max = 100, message = "城市名称不能超过100个字符")
    private String name;
}